const Hello = `
type Hello {
    text: String
    index: Int
}
`;

export function schema() {
    return [Hello];
}

export const queryDefs = `
hello: Hello
`;

export const queries = {
    hello(obj, args, context) {
        return context.connectors.Hello.get();
    }
};

export const mutationDefs = `
setHello(delta: Int!): Int
`;

export const mutations = {
    setHello(obj, {delta}, context) {
        return context.connectors.Hello.set(delta);
    }
};

import HelloConnector from './hello';

export const connectors = {
    Hello: HelloConnector
};
